<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStoresTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('c_stores', function (Blueprint $table) {
            $table->increments('id');
            $table->string('shop_name',50)->default(null)->comment('店铺名称');
            $table->integer('shop_type')->default(0)->comment('行业类型');
            $table->integer('province_id')->default(0)->comment('省');
            $table->integer('city_id')->default(0)->comment('市');
            $table->integer('views')->default(0)->comment('浏览量');
            $table->integer('county_id')->default(0)->comment('县');
            $table->integer('address')->default(0)->comment('详细地址');
            $table->string('lng')->default(0)->comment('经度');
            $table->string('lat')->default(0)->comment('纬度');
            $table->string('phone',11)->default(null)->comment('电话');
            $table->string('wechat',50)->default(null)->comment('微信号');
            $table->string('notice',255)->default(null)->comment('公告');
            $table->string('logo',100)->default(null)->comment('LOGO');
            $table->string('images',255)->default(null)->comment('轮播图');
            $table->string('detail_images',255)->default(null)->comment('详情图');
            $table->text('introduce',255)->default(null)->comment('介绍');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->integer('buy_type')->default(0)->comment('购买类型');
            $table->integer('status')->default(0)->comment('状态0未审核1已通过2已驳回');
            $table->string('reject_reason',100)->default(0)->comment('状态0未审核1已通过2已驳回');
            $table->integer('admin_user')->default(0)->comment('审核人id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_stores');
    }
}
